<!--
* @author wn
* @date 2022/04/13 16:44:45
* @description:首页
!-->
<template>
	<!-- 顶部通栏 -->
	<app-nav-bar />
	<!-- 头部吸顶组件 -->
	<app-header-sticky />
	<!-- 头部组件 -->
	<app-header />
	<!-- 内容容器 -->
	<section class="main">
		<!-- 二级路由 home--index-->
		<router-view></router-view>
	</section>
	<!-- 底部组件 -->
	<app-footer />
</template>
<script>
import AppNavBar from '@/components/AppNavBar'
import AppHeader from '@/components/AppHeader'
import AppFooter from '@/components/AppFooter'
import AppHeaderSticky from '@/components/AppHeaderSticky'

import { useStore } from 'vuex'

export default {
	name: 'Layout',
	components: {
		AppNavBar,
		AppHeader,
		AppFooter,
		AppHeaderSticky,
	},
	setup() {
		// 更新 Vuex 分类数据
		const store = useStore()
		store.dispatch('category/getList')
	},
}
</script>
